package com.fw.model;

import java.util.List;

import com.jfinal.plugin.activerecord.Model;

public class User extends Model<User>{

	private static final long serialVersionUID = 1L;
	public static final User userDao = new User();
	public List<Role> getRoles(){
		String sql = "SELECT r.* FROM user u,role r,user_role ur WHERE u.u_id = ur.u_id AND r.r_id = ur.r_id and u.u_id = ?";
		return Role.roleDao.find(sql,get("u_id"));
	}
}
